<?php

define('KC_INDEX',True);

require_once '../global.php';

/**

	创建内容页

	@param string $listid: 列表
	@param int    $kid   : 要生成的id
	@param int    $pid   : 第?页
	@param int    $is    : 生成或是返回值？1返回值
	@return string

*/
function king_def(){
	global $king;
	$king->load('portal');
$data=$king->db->getRows_one("select mid,name from metas where nshow='0' order by mid asc");
print_r($data);

	if(empty($time)) $time='900';
	$cachepath="gxsj/";

	

	if(!$block=$king->cache->get($cachepath,time()-$time)){
		$data=$king->db->getRows_one("select mid,name from metas where nshow='0' order by mid asc");
		if(empty($data)){
			$data['ktitle']='已经更新完毕111';
		}else{
			if(!empty($data['mid'])){			
				$king->db->update('metas',array('nshow'=>'1'),'mid='.$data['mid']);
				$king->cache->put($cachepath,'最新更新：'.$data['mid']);
			}
		}
	}





	echo '<!--'.$block.$blockto.'-->';

	

}



?>